package homework;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

/*
使用对象输入流进行对象的反序列化
反序列化:将一组字节还原为java对象
 */
public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("I'M K.txt");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object obj = ois.readObject();
        Student kk =(Student) obj;
        System.out.println(kk);
        System.out.println("写入完成");
        ois.close();

    }
}
